package com.oracle.calllog.analyze.util;

import java.util.LinkedHashMap;
import java.util.Map;

public class MyLRUCacheUtil extends LinkedHashMap<String, Integer> {
	private static final long serialVersionUID = 1L;
	protected int maxElements;

	public MyLRUCacheUtil(int maxSize) {
		super(maxSize, 0.75F, true);
		this.maxElements = maxSize;
	}

	@Override
	protected boolean removeEldestEntry(Map.Entry<String, Integer> eldest) {
		return (this.size() > this.maxElements);
	}
}
